package com.ckm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.sql.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class College implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 学院id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 学院名字
     */
    @NotNull(message = "学院名不能为空")
    private String colName;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

}
